<div id="flashMessage" class="message<?= empty($class)?'':" $class" ?>"><?= $message ?></div>

<script type="text/javascript">
setTimeout(function() {
	$('#flashMessage').slideUp();
}, 3000);
</script>